package models;

import java.util.ArrayList;

public class Player {
	int bet;
	int bankroll;
	int index;
	boolean playedInRound;
	boolean betInRound;
	boolean exchanged;
	boolean didFold;
	boolean didAllIn;
	boolean disconnected;
	boolean outOfCoins;
	Hand hand;
	ArrayList<Card> cardsToExchange;
	
	Player(int startBankroll, int index) {
		bankroll = startBankroll;
		this.index = index;
		hand = new Hand();
		cardsToExchange = new ArrayList<Card>();
	}
	
	boolean outOfGame() {
		return disconnected || outOfCoins();
	}
	
	boolean outOfCoins() {
		if(bankroll == 0) {
			return true;
		} else {
			return false;
		}
	}
	
	boolean cantPlay() {
		return didFold 
				|| didAllIn 
				|| disconnected 
				|| outOfCoins;
	}
	
	void setBet(int bet) {
		this.bet = bet;
	}
	
	int getBet() {
		return bet;
	}
	
	void setBankroll(int bankroll) {
		this.bankroll = bankroll;
	}
	
	int getBankroll() {
		return bankroll;
	}
	
	
}
